package com.ruoyi.web.controller.doctor;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.doctor.service.DoctorPatientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/doctor/patient")
public class DoctorPatientController {
    @Autowired
    private DoctorPatientService doctorPatientService;

    /**
     * 根据身份id查询患者
     * @param patientId
     * @return
     */
    @GetMapping("/getPatientById/{patientId}")
    public AjaxResult getPatientById(@PathVariable Long patientId){
        return AjaxResult.success(doctorPatientService.selectById(patientId));
    }
}
